qx.Class.define("caraffa.forms.ChartPacientesMedicoMes",
{
	extend : qx.ui.form.ow.FormTab,

	construct : function ()
	{
		this.base(arguments, "ChartPacientesMedicoMes", "Est: Pac. Atendidos Médicos");
		
		this._GC = new qx.ui.groupbox.GroupBox();
  		this._GC.setWidth(700);
  		this._GC.setLayout(new qx.ui.layout.Basic());
		
		this._txdFecha = new qx.ui.form.ow.DateText("Fecha a mostrar:");
			this._txdFecha.getDateText().setWidth(120);
		this._imgChartPMM = new qx.ui.basic.Image("");
		
		this._GC.add(this._txdFecha, {left:0, top:0});
		this._GC.add(this._imgChartPMM, {left:0, top:50});

		this._attachEvents();
		
		this.add(this._GC, {left:10, top:10});
		
		this._imgChartPMM.setSource("reports/ChartPacientesMedicoMes.php?fecha=" + this._txdFecha.getValue());
	},
	members :
	{
		_attachEvents : function ()
		{
			this._txdFecha.getDateText().addListener("changeValue", function ()
			{
				this._imgChartPMM.setSource("reports/ChartPacientesMedicoMes.php?fecha=" + this._txdFecha.getValue());
			}, this);
		}
	}
});
